# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Corey Oliver <corey.jon.oliver@gmail.com>
pkgname=libzen
pkgver=0.4.38
pkgrel=0
pkgdesc="A shared library for libmediainfo and mediainfo"
url="https://github.com/MediaArea/ZenLib"
arch="all"
license="Zlib"
makedepends="cmake"
subpackages="$pkgname-dev"
source="https://mediaarea.net/download/source/libzen/$pkgver/libzen_$pkgver.tar.bz2"
options="!check"  # upstream does not provide tests
builddir="$srcdir/ZenLib/Project/CMake"

build() {
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DLIB_INSTALL_DIR=/usr/lib \
		-DCMAKE_VERBOSE_MAKEFILE=ON
	make -C build
}

check() {
	make -C build check
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="d946cd2349848925e13a3fb6aab5ad4f5aca28bc89b3263faca3096d7bbcae3a4ff9ed2552bf005b4ca1f4c8c8f59856f4c4aafa7c734ecebd078e6fc40a9a0b  libzen_0.4.38.tar.bz2"
